import { Component, OnInit } from '@angular/core';
import { Router,NavigationExtras } from '@angular/router';
@Component({
  selector: 'app-product',
  templateUrl: './product.component.html',
  styleUrls: ['./product.component.less']
})
export class ProductComponent implements OnInit {

  constructor(public router:Router) { }

  ngOnInit(): void {
  }
  goContent(){
    //路由跳转
    this.router.navigate([ '/prouctcontent/', '123' ])
  }
  goHome(){
     //路由跳转
     this.router.navigate([ '/home' ])
  }
  goGet(){
    //get传值跳转
    let queryParmas:NavigationExtras={
        queryParams:{'id':123}
    }
    this.router.navigate(['/news'],queryParmas)
  }
}
